import React, { useEffect } from 'react';
import ReadUi from '../ui/ReadUi'
import { useDispatch, useSelector } from 'react-redux'
import { loadAsync } from '../actionCreater'

const Reacmodel = () => {
    let list = useSelector( state => state.readmodel.list)

    const dispatch = useDispatch()

    useEffect(() => {
        dispatch(loadAsync())
    },[dispatch])

    return (
        <ReadUi list = { list }></ReadUi>
    );
}

export default Reacmodel;